import request from '@/utils/request'

export function add(data) {
  return request({
    url: '/coCompany',
    method: 'post',
    data
  })
}

export function del(data) {
  return request({
    url: '/coCompany',
    method: 'delete',
    data
  })
}

export function edit(data) {
  return request({
    url: '/coCompany',
    method: 'put',
    data
  })
}

export function getCoCompany(id) {
  return request({
    url: '/coCompany/' + id,
    method: 'get'
  })
}

export function listCoCompany(params, page) {
  return request({
    url: '/coCompany/list/' + page.pageNum + '/' + page.pageSize,
    method: 'get',
    params
  })
}

export function exportCoCompany() {
  return request({
    url: '/coCompany/export',
    method: 'post',
    responseType: 'blob'
  })
}

export default { add, edit, del, getCoCompany, listCoCompany, exportCoCompany }
